import request from '@/http/request'
const apiUrl = 'bf-finance'


// -----------资金管理相关接口----------
export const fundManagementApi = {
    getDepartmentVo:()=>request.get(`${apiUrl}/fund/budget/getDepartmentVo`), // 查询部门列表
    getFundBudgetPlanVo: (param) => request.post(`${apiUrl}/fund/budget/getFundBudgetPlanVo`, param), // 资金预算管理
    getFundBudgetExamineRecordVo: (param) => request.post(`${apiUrl}/fund/budget/getFundBudgetExamineRecordVo`, param), // 资金预算绩效查询
    getFundBudgetExamineRuleVo:()=>request.get(`${apiUrl}/fund/budget/getFundBudgetExamineRuleVo`), // 查询资金预算绩效设置
    saveFundBudgetExamineRule: (param) => request.post(`${apiUrl}/fund/budget/saveFundBudgetExamineRule`, param), // 保存资金预算绩效设置
    getBudgetSubject:(subjectType)=>request.get(`${apiUrl}/subject/excel/getBudgetSubject?subjectType=${subjectType}`), // 查资金预算基础数据维表 excel html
    getFundBudgetLimitRuleVo:()=>request.get(`${apiUrl}/fund/budget/getFundBudgetLimitRuleVo`), // 获取预算金额预警
    saveFundBudgetLimitRuleVo: (param) => request.post(`${apiUrl}/fund/budget/getFundBudgetLimitRuleVo`, param), // 保存预算金额预警
    getProjectSets:()=>request.get(`bf-project/projectSet/getProjectSets`), // 获取所有项目集，不分页
    getDepartmentProjectSetTree:()=>request.get(`bf-project/projectSet/getDepartmentProjectSetTree`), // 获取部门可使用的项目集树状结构，不分页
    getProjectSetChildList:(param)=>request.get(`bf-project/projectSet/getProjectSetChildList`,{params:param}), // 根据项目集id获取子集列表
    getDepartmentProjectSet:(param)=>request.get(`bf-project/projectSet/getDepartmentProjectSet`,{params:param}), // 获取部门可使用的项目集列表，不分页
    getBudgetSubjectList:(param)=>request.get(`${apiUrl}/subject/getBudgetSubjectList`,{params:param}), // 获取子预算科目
    getProjects:(projectSetId)=>request.get(`bf-project/project/getProjects?projectSetId=${projectSetId}`), // 获取所有项目
    createBudget: (param) => request.post(`${apiUrl}/fund/budget/createBudget`, param), // 新增资金预算
    getFundBudgetExecuteRecordVo: (param) => request.post(`${apiUrl}/fund/budget/getFundBudgetExecuteRecordVo`, param), // 资金预算执行台账
    getFundLimitRuleVo:()=>request.get(`${apiUrl}/fund/budget/getFundLimitRuleVo`), // 获取大额资金设置
    updateFundLimitRule: (param) => request.post(`${apiUrl}/fund/budget/updateFundLimitRule`, param), // 修改大额资金设置
    getDepartmentSummaryVo: (param) => request.post(`${apiUrl}/fund/budget/getDepartmentSummaryVo`, param), // 按部门汇总流入流出
    getDepartmentSummarySub: (param) => request.post(`${apiUrl}/fund/budget/getDepartmentSummarySub`, param), // 资金预算-按部门搜索
    getDepartmentSummaryInfo: (param) => request.post(`${apiUrl}/fund/budget/getDepartmentSummaryInfo`, param), // 查询部门汇总流入流出明细
    getBudgetTotalInvestment:(param)=>request.post(`bf-finance/fund/budget/getBudgetTotalInvestment`,param), // 项目总投资
    initiateProcess:(param)=>request.post(`bf-finance/fund/budget/initiateProcess`,param), // 发起流程
    fundBudgetExecuteRecordInitiateProcess:(param)=>request.post(`bf-finance/fund/budget/fundBudgetExecuteRecordInitiateProcess`,param), // 资金预算执行台账发起流程
    getBudgetSubjectListPage:(param)=>request.post(`bf-finance/subject/getBudgetSubjectListPage`,param), // 获取子预算科目树状
    createBudgetSubject:(param)=>request.post(`bf-finance/subject/createBudgetSubject`,param), //创建预算科目
    getFundBudget:()=>request.get(`bf-finance/fund/budget/getFundBudget`), //资金预算情况
    getFundBudgetBusinessUnitAll:()=>request.get(`bf-finance/fund/budget/getFundBudgetBusinessUnitAll`), //获取业务单元
    getDepartmentSummarySubTotal:(params)=>request.post(`bf-finance/fund/budget/getDepartmentSummarySubTotal`,params), //资金预算台账按搜索条件-统计
    getProjectDetailInfo:(params)=>request.get(`bf-project/project/getProjectDetailInfo`,{params:params}), //资金预算台账按搜索条件
    getFundBudgetPlanList:(params)=>request.post(`bf-finance/fund/budget/getFundBudgetPlanList`,params), //资金预算台账按搜索条件
    getDepartmentBudgetPlanDetail:(params)=>request.post(`bf-finance/fund/budget/getDepartmentBudgetPlanDetail`,params), // 资金预算台账按搜索条件-部门预算明细
    initiateBudgetProcess:(params)=>request.post(`bf-finance/fund/budget/initiateBudgetProcess`,params), // 发起流程
    getDepartmentBudgetPlanDetailContract:(params)=>request.get(`bf-finance/fund/budget/getDepartmentBudgetPlanDetailContract`,{params:params}), // 资金预算台账按搜索条件-部门预算明细-合同
    addBudgetPlanDetailContract:(params)=>request.post(`bf-finance/fund/budget/addBudgetPlanDetailContract`,params), // 新增资金预算绑定合同
}

// -----------预算管理相关接口----------
export const budgetManagement = {
    getBudgetPredictionRecordVo: (param) => request.post(`${apiUrl}/budgetPredictionRecord/getBudgetPredictionRecordVo`, param), // 预算管理
    getProjectList:()=>request.get(`${apiUrl}/fund/budget/getProjectList`), // 获取项目信息
    addBudgetGatherRecord: (param) => request.post(`${apiUrl}/budgetPredictionRecord/addBudgetGatherRecord`, param), // 新增预算
    getBudgetSubjectType:(type)=>request.get(`${apiUrl}/budgetPredictionRecord/getBudgetSubjectType?type=${type}`), // 获取预算科目
    addBudgetPredictionRecord: (param) => request.post(`${apiUrl}/budgetPredictionRecord/addBudgetPredictionRecord`, param), // 新增预测
    getAnnualBudgetVo: (param) => request.post(`${apiUrl}/budgetAnnual/getAnnualBudgetVo`, param), // 获取全年预算
    getBudgetOwnershipInterestVo: (param) => request.post(`${apiUrl}/budgetOwnershipInterest/getBudgetOwnershipInterestVo`, param), // 获取所有者权益数据
    updateBudgetOwnershipInterestVo: (param) => request.post(`${apiUrl}/budgetOwnershipInterest/update`, param), // 修改所有者权益
    getBudgetSubjectTypeList: (param) => request.post(`${apiUrl}/budgetPredictionRecord/getBudgetSubjectTypeList`, param), // 查询预算科目列表
    addBudgetSubject: (param) => request.post(`${apiUrl}/budgetPredictionRecord/addBudgetSubject`, param), // 新增预算科目
    updateBudgetPredictionRecord: (param) => request.post(`${apiUrl}/budgetPredictionRecord/updateBudgetPredictionRecord`, param), // 预算管理修改
    getBudgetPredictionRecordInfoList: (param) => request.post(`${apiUrl}/budgetPredictionRecord/getBudgetPredictionRecordInfoList`, param), // 查询预测汇总
    addBudgetOwnershipInterest: (param) => request.post(`${apiUrl}/budgetOwnershipInterest/add`, param), // 新增所有者权益数据
    importExcel_budgetAnnual: (param) => request.post(`${apiUrl}/budgetAnnual/importExcel`, param), // 全年预算导入
    templateDownload_budgetAnnual:()=>request.get(`${apiUrl}/budgetAnnual/template`,{responseType: 'arraybuffer'}), // 全年预算导入模板下载
    getBudgetSubjectTypeListLeadingOut:(param)=>request.post(`${apiUrl}/leadingOut/getBudgetSubjectTypeListLeadingOut`,param,{responseType: 'arraybuffer'}), // 预算科目导出
    deleteBudget:(budgetPlanId)=>request.get(`${apiUrl}/fund/budget/delete?budgetPlanId=${budgetPlanId}`), // 删除资金预算
    updateBudget:(param)=>request.post(`${apiUrl}/fund/budget/update`,param), // 编辑资金预算
    updateBudgetGtherRecord:(param)=>request.post(`${apiUrl}/budgetPredictionRecord/updateBudgetGtherRecord`,param), // 修改预算
    updateBudgetTotalInvestment:(param)=>request.post(`${apiUrl}/fund/budget/updateBudgetTotalInvestment`,param), // 修改总投资
    budgetSplitting:(param)=>request.post(`${apiUrl}/fund/budget/reInitiateProcess`,param), // 预算拆分重新提交发起流程
}

/**
 * 开票管理相关接口
 * @type {{}}
 */
export const invoicingManagementApi = {
    getPageBudgetInvoicingVo: (param) => request.post(`${apiUrl}/budgetInvoicing/getPageBudgetInvoicingVo`, param), // 开票管理
    getAutomaticInvoicingPage: (param) => request.post(`${apiUrl}/budgetInvoicing/getAutomaticInvoicingPage`, param), // 自动开票
}

/**
 * 养老相关接口
 * @type {{}}
 */
export const retirementApi = {
    getBfFinanceAgedCanteenNewPage: (param) => request.post(`${apiUrl}/system/bfFinanceAgedCanteenNew/page`, param), // 养老食堂账单分页查询
    templateDownload:()=>request.get(`${apiUrl}/system/bfFinanceAgedCanteenNew/template`,{responseType: 'arraybuffer'}), // 养老项目列表导入模板下载
    exportList:(param)=>request.post(`${apiUrl}/system/bfFinanceAgedCanteenNew/export`,param,{responseType: 'arraybuffer'}), // 养老项目列表导出
    importExcel: (param) => request.post(`${apiUrl}/system/bfFinanceAgedCanteenNew/importExcel`, param), // 养老项目导入excel
    packageList: (param) => request.post(`${apiUrl}/system/bfFinanceAgedCanteenNew/packageList`, param), // 套餐销售额分页查询
    otherList: (param) => request.post(`${apiUrl}/system/bfFinanceAgedCanteenNew/otherList`, param), // 其他销售额分页查询
    pastryList: (param) => request.post(`${apiUrl}/system/bfFinanceAgedCanteenNew/pastryList`, param), // 面点销售额分页查询
    getBfFinanceAgedCharge: (param) => request.post(`${apiUrl}/system/bfFinanceAgedCharge/page`, param), // 养老收费账单分页查询
    bfFinanceAgedChargeTemplate:()=>request.get(`${apiUrl}/system/bfFinanceAgedCharge/template`,{responseType: 'arraybuffer'}), // 养老收费导入模板下载
    exportBfFinanceAgedCharge:(param)=>request.post(`${apiUrl}/system/bfFinanceAgedCharge/export`,param,{responseType: 'arraybuffer'}), // 养老收费列表导出
    importExcelBfFinanceAgedCharge:(param)=>request.post(`${apiUrl}/system/bfFinanceAgedCharge/importExcel`,param), // 养老项目导入信息
    bfFinanceAgedCanteenNewPage:(param)=>request.post(`${apiUrl}/system/bfFinanceAgedCanteenNew/newPage`,param), // 养老管理列表
}

/**
 * 担保台账相关接口
 * @type {{}}
 */
export const guaranteeApi = {
    pastryList: (param) => request.post(`${apiUrl}/bankGuarantee/getBankGuaranteeList`, param), // 担保台账
    addBankGuarantee: (param) => request.post(`${apiUrl}/bankGuarantee/add`, param), // 新增担保信息
    deleteBankGuarantee: (param) => request.post(`${apiUrl}/bankGuarantee/delete`, param), // 删除担保信息
    getBankGuaranteeDetailed: (param) => request.post(`${apiUrl}/bankGuarantee/getBankGuaranteeDetailed`, param), // 查询担保明细列表
}

/**
 * 托育相关接口
 * @type {{}}
 */
export const nurseryApi = {
    getBfFinanceDepositChildPage: (param) => request.post(`${apiUrl}/system/bfFinanceDepositChild/page`, param), // 托育列表分页查询
    editBfFinanceDepositChildSave: (param) => request.post(`${apiUrl}/system/bfFinanceDepositChild/edit`, param), // 托育编辑后保存
    exportBfFinanceDepositChild:(param)=>request.post(`${apiUrl}/system/bfFinanceDepositChild/export`,param,{responseType: 'arraybuffer'}), // 托育列表导出
    templateDownload_nursery:()=>request.get(`${apiUrl}/system/bfFinanceDepositChild/template`,{responseType: 'arraybuffer'}), // 托育板块导入模板下载
    importExcel_depositChild:(param)=>request.post(`${apiUrl}/system/bfFinanceDepositChild/importExcel`,param), // 托育板块导入
}

/**
 * 医疗相关接口
 * @type {{}}
 */
export const medicalTreatmentApi = {
    bfFinanceHospitalLedger:(param)=>request.post(`${apiUrl}/system/bfFinanceHospitalLedger/page`,param), // 医疗实验室台账分页查询
    bfFinanceHospitalLedgerTemplate:(param)=>request.get(`${apiUrl}/system/bfFinanceHospitalLedger/template`,{responseType: 'arraybuffer'}), // 医疗实验室台账导入模板下载
    importExcelBfFinanceHospitalLedger:(param)=>request.post(`${apiUrl}/system/bfFinanceHospitalLedger/importExcel`,param), // 医疗实验室台账导入信息
    bfFinanceHospitalDoorPage:(param)=>request.post(`${apiUrl}/system/bfFinanceHospitalDoor/page`,param), // 医疗门诊账单分页查询
    importExcelBfFinanceHospitalDoor:(param)=>request.post(`${apiUrl}/system/bfFinanceHospitalDoor/importExcel`,param), // 医疗门诊账单导入信息
    bfFinanceHospitalDoorExport:(param)=>request.post(`${apiUrl}/system/bfFinanceHospitalDoor/export`,param,{responseType: 'arraybuffer'}), // 医疗门诊账单导出
    bfFinanceHospitalDoorTemplate:()=>request.get(`${apiUrl}/system/bfFinanceHospitalDoor/template`,{responseType: 'arraybuffer'}), // 医疗门诊账单导入模板下载

}

/**
 * 体育相关接口
 * @type {{}}
 */
export const physicalCultureApi = {
    bfFinanceStadiumOrderPage:(param)=>request.post(`${apiUrl}/system/bfFinanceStadiumOrder/page`,param), // 体育场馆订单分页查询
    importExcelBfFinanceStadiumOrder:(param)=>request.post(`${apiUrl}/system/bfFinanceStadiumOrder/importExcel`,param), // 体育场馆订单导入信息
    bfFinanceStadiumOrderTemplate:()=>request.get(`${apiUrl}/system/bfFinanceStadiumOrder/template`,{responseType: 'arraybuffer'}), // 体育场馆订单导入模板下载
    bfFinanceStadiumOrderExport:(param)=>request.post(`${apiUrl}/system/bfFinanceStadiumOrder/export`,param,{responseType: 'arraybuffer'}), // 体育场馆订单导出
    bfFinanceCoachOrderPage:(param)=>request.post(`${apiUrl}/system/bfFinanceCoachOrder/page`,param), // 驻场教练订单分页查询
    importExcelBfFinanceCoachOrder:(param)=>request.post(`${apiUrl}/system/bfFinanceCoachOrder/importExcel`,param), // 驻场教练订单导入信息
    bfFinanceCoachOrderTemplate:()=>request.get(`${apiUrl}/system/bfFinanceCoachOrder/template`,{responseType: 'arraybuffer'}), // 驻场教练订单导入模板下载
    bfFinanceCoachOrderExport:(param)=>request.post(`${apiUrl}/system/bfFinanceCoachOrder/export`,param,{responseType: 'arraybuffer'}), // 驻场教练订单导出
    bfFinanceLightingOrderPage:(param)=>request.post(`${apiUrl}/system/bfFinanceLightingOrder/page`,param), // 灯光费订单列表查询
    importExcelBfFinanceLightingOrder:(param)=>request.post(`${apiUrl}/system/bfFinanceLightingOrder/importExcel`,param), // 灯光费订单导入信息
    bfFinanceLightingOrderTemplate:()=>request.get(`${apiUrl}/system/bfFinanceLightingOrder/template`,{responseType: 'arraybuffer'}), // 灯光费订单导入模板下载
    bfFinanceLightingOrderExport:(param)=>request.post(`${apiUrl}/system/bfFinanceLightingOrder/export`,param,{responseType: 'arraybuffer'}), // 灯光费订单导出
    bfFinanceServiceOrderPage:(param)=>request.post(`${apiUrl}/system/bfFinanceServiceOrder/page`,param), // 服务订单分页查询
    importExcelBfFinanceServiceOrder:(param)=>request.post(`${apiUrl}/system/bfFinanceServiceOrder/importExcel`,param), // 服务订单导入信息
    bfFinanceServiceOrderTemplate:()=>request.get(`${apiUrl}/system/bfFinanceServiceOrder/template`,{responseType: 'arraybuffer'}), // 服务订单导入模板下载
    bfFinanceServiceOrderExport:()=>request.get(`${apiUrl}/system/bfFinanceServiceOrder/export`,{responseType: 'arraybuffer'}), // 服务订单导出
    bfFinanceDiscountOrderPage:(param)=>request.post(`${apiUrl}/system/bfFinanceDiscountOrder/page`,param), // 折扣卡订单查询
    importExcelBfFinanceDiscountOrder:(param)=>request.post(`${apiUrl}/system/bfFinanceDiscountOrder/importExcel`,param), // 折扣卡订单导入信息
    bfFinanceDiscountOrderTemplate:()=>request.get(`${apiUrl}/system/bfFinanceDiscountOrder/template`,{responseType: 'arraybuffer'}), // 折扣卡订单导入模板下载
    bfFinanceDiscountOrderExport:(param)=>request.post(`${apiUrl}/system/bfFinanceDiscountOrder/export`,param,{responseType: 'arraybuffer'}), // 折扣卡订单导出
    bfFinanceParkingLotPage:(param)=>request.post(`${apiUrl}/system/bfFinanceParkingLot/page`,param), // 停车场临停账单列表分页查询
    importExcelBfFinanceParkingLot:(param)=>request.post(`${apiUrl}/system/bfFinanceParkingLot/importExcel`,param), // 停车场临停账单导入信息
    bfFinanceParkingLotTemplate:()=>request.get(`${apiUrl}/system/bfFinanceParkingLot/template`,{responseType: 'arraybuffer'}), // 停车场临停账单导入模板下载
    bfFinanceParkingLotExport:(param)=>request.post(`${apiUrl}/system/bfFinanceParkingLot/export`,param,{responseType: 'arraybuffer'}), // 停车场临停账单导出
    bfFinanceParkingLotAmount:(param)=>request.post(`${apiUrl}/system/bfFinanceParkingLot/amount`,param), // 停车场临停账单合计
    bfFinanceLongParkingLotPage:(param)=>request.post(`${apiUrl}/system/bfFinanceLongParkingLot/page`,param), // 停车场长期账单列表分页查询
    importExcelBfFinanceLongParkingLot:(param)=>request.post(`${apiUrl}/system/bfFinanceLongParkingLot/importExcel`,param), // 停车场长期账单导入信息
    bfFinanceLongParkingLotTemplate:()=>request.get(`${apiUrl}/system/bfFinanceLongParkingLot/template`,{responseType: 'arraybuffer'}), // 停车场长期账单导入模板下载
    bfFinanceLongParkingLotExport:()=>request.get(`${apiUrl}/system/bfFinanceLongParkingLot/export`,{responseType: 'arraybuffer'}), // 停车场长期账单导出
    bfFinanceLongParkingLotAmount:(param)=>request.post(`${apiUrl}/system/bfFinanceLongParkingLot/amount`,param), // 停车场长期账单合计
    bfFinanceOtherParkingLotPage:(param)=>request.post(`${apiUrl}/system/bfFinanceOtherParkingLot/page`,param), // 停车场其他业务列表分页查询
    importExcelBfFinanceOtherParkingLot:(param)=>request.post(`${apiUrl}/system/bfFinanceOtherParkingLot/importExcel`,param), // 停车场其他业务账单导入信息
    bfFinanceOtherParkingLotTemplate:()=>request.get(`${apiUrl}/system/bfFinanceOtherParkingLot/template`,{responseType: 'arraybuffer'}), // 停车场其他业务账单导入模板下载
    bfFinanceOtherParkingLotExport:(param)=>request.post(`${apiUrl}/system/bfFinanceOtherParkingLot/export`,param,{responseType: 'arraybuffer'}), // 停车场其他业务账单导出
    bfFinanceOtherParkingLotAmount:(param)=>request.post(`${apiUrl}/system/bfFinanceOtherParkingLot/amount`,param), // 停车场其他业务账单合计
}

/**
 * 文创相关合同
 * @type {{}}
 */
export const culturalCreativityApi = {
    culturalPage:(param)=>request.post(`${apiUrl}/system/bfFinanceCulturalOpen/page`,param), // 文创板块 查列表
    importExcel:(param)=>request.post(`${apiUrl}/system/bfFinanceCulturalOpen/importExcel`,param), // 文创板块户外合同导入信息
    importExcelNo:(param)=>request.post(`${apiUrl}/system/bfFinanceCulturalOpen/importExcelNo`,param), // 文创板块非户外合同导入信息
    exportCultural:(param)=>request.post(`${apiUrl}/system/bfFinanceCulturalOpen/export`,param,{responseType: 'arraybuffer'}), // 文创板块导出
    templateCultural:()=>request.get(`${apiUrl}/system/bfFinanceCulturalOpen/template`,{responseType: 'arraybuffer'}), // 文创板块导入模板下载
}

/**
 * 银行管理相关接口
 * @type {{}}
 */
export const bankManagementApi = {
    getInternalTransactionRecordList: (param) => request.post(`${apiUrl}/companyLoanAmount/getInternalTransactionRecordList`, param), // 内部往来记录
    addInterest: (param) => request.post(`${apiUrl}/companyLoanAmount/addInterest`, param), // 新增计息计算
    interestCount: (param) => request.post(`${apiUrl}/companyLoanAmount/interestCount`, param), // 计提计算
    getCompanyRepayment: (param) => request.post(`${apiUrl}/companyLoanAmount/getCompanyRepayment`, param), // 还款明细
    getInterestPageList: (param) => request.post(`${apiUrl}/companyLoanAmount/getInterestPageList`, param), // 查询计息明细表
    addCompanyRepayment: (param) => request.post(`${apiUrl}/companyLoanAmount/addCompanyRepayment`, param), // 发起内部还款
    getBankCompanyInfo: (bankAccountId) => request.get(`${apiUrl}/company/getBankCompanyInfo?bankAccountId=${bankAccountId}`), // 查询银行信息详情
}

/**
 * 公司相关接口
 * @type {{}}
 */
export const companyApi = {
    getList: (param) => request.post(`${apiUrl}/company/getList`,param), // 查询公司列表
    getBankCompany: (param) => request.post(`${apiUrl}/company/getBankCompany`,param), // 银行信息表
    getBankList: () => request.get(`${apiUrl}/company/getBankList`), // 获取银行列表
    importExcel: (param) => request.post(`${apiUrl}/company/importExcel`,param), // 余额表导入
    downloadTemplate: () => request.get(`${apiUrl}/company/template`,{responseType: 'arraybuffer'}), // 余额表导入模板下载
    getBankBalance: (param) => request.post(`${apiUrl}/company/getBankBalance`,param), // 银行余额表
    getBankLoanInterestTotal: (param) => request.post(`${apiUrl}/companyLoanAmount/getBankLoanInterestTotal`,param), // 计息汇总表
}

/**
 * 融资相关接口
 *
 */
export const financingApi = {
    getPageList: (param) => request.post(`${apiUrl}/financing/getPageList`,param), // 融资台账
    getFinancialInstitution: () => request.get(`${apiUrl}/financing/getFinancialInstitution`), // 获取银行信息
    addBankCreditAmount: (param) => request.post(`${apiUrl}/financing/addBankCreditAmount`,param), // 新增融资信息
    getBankLoanDrawRecordVo: (param) => request.post(`${apiUrl}/financing/getBankLoanDrawRecordVo`,param), // 获取提取明细表
    getBankRepaymentRecordVo: (param) => request.post(`${apiUrl}/financing/getBankRepaymentRecordVo`,param), // 获取还款明细表
    initiateRepaymentPlan: (param) => request.post(`${apiUrl}/financing/initiateRepaymentPlan`,param), // 发起还款计划
    addBankLoanInterest: (param) => request.post(`${apiUrl}/financing/addBankLoanInterest`,param), // 新增计提计划
    deleteDrawRecordList: (param) => request.post(`${apiUrl}/financing/deleteDrawRecordList`,param), // 批量删除提取明细
    updateBankLoanDrawRecord: (param) => request.post(`${apiUrl}/financing/updateBankLoanDrawRecord`,param), // 提取明细修改
    getLoanContractFinancingInformation: (param) => request.get(`${apiUrl}/financing/getLoanContractFinancingInformation?creditId=${param.creditId}`), // 借款合同融资信息表
    deleteBankRepaymentRecord: (param) => request.post(`${apiUrl}/financing/deleteBankRepaymentRecord`,param), // 删除还款明细
    getBankCreditRule: () => request.get(`${apiUrl}/bankCreditRule/get`), // 获取融资占用额度反馈
    saveBankCreditRule: (param) => request.post(`${apiUrl}/bankCreditRule/save`,param), // 保存融资占用额度反馈
    getBankRepaymentRecordRemind: () => request.get(`${apiUrl}/bankRepaymentRecordRemind/get`), // 到期提醒查询
    saveBankRepaymentRecordRemind: (param) => request.post(`${apiUrl}/bankRepaymentRecordRemind/save`,param), // 保存到期提醒
    getFinancing: () => request.get(`${apiUrl}/financing/getFinancing`), // 融资情况
    interestCount: (param) => request.post(`${apiUrl}/bankLoanInterest/interestCount`,param), // 利息计算


}

/**
 * 利息管理相关接口
 * @type {{}}
 */
export const interestManagement = {
    getBankLoanInterestMeet: (param) => request.post(`${apiUrl}/bankLoanInterest/getBankLoanInterestMeet`,param), // 计提应付台账
    getInterestPaymentLedger: (param) => request.post(`${apiUrl}/bankLoanInterest/getInterestPaymentLedger`,param), // 利息支付台账
    deleteBankLoanInterest: (param) => request.post(`${apiUrl}/bankLoanInterest/delete`,param), // 删除计提应付台账
    getPageList: (param) => request.post(`${apiUrl}/bankLoanInterest/getPageList`,param), // 利息管理
    initiateProcess: (param) => request.post(`${apiUrl}/bankLoanInterest/initiateProcess`,param), // 发起流程
    addBankLoanInterest: (param) => request.post(`${apiUrl}/bankLoanInterest/addBankLoanInterest`,param), // 利息支付

}

// -----------导出相关接口----------
export const exportApi = {
    getDepartmentSummaryVoLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getDepartmentSummaryVoLeadingOut`,param,{responseType: 'arraybuffer'}), // 按部门汇总导出
    getDepartmentSummarySubLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getDepartmentSummarySubLeadingOut`,param,{responseType: 'arraybuffer'}), // 按部门搜索导出
    getDepartmentSummarySubLeadingOutInfo: (param) => request.post(`${apiUrl}/leadingOut/getDepartmentSummarySubLeadingOutInfo`,param,{responseType: 'arraybuffer'}), // 按部门 导出细项
    getBudgetTotalInvestmentLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBudgetTotalInvestmentLeadingOut`,param,{responseType: 'arraybuffer'}), // 项目总投资导出
    getBudgetPredictionRecordLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBudgetPredictionRecordLeadingOut`,param,{responseType: 'arraybuffer'}), // 预算管理导出
    fundBudgetPlanVoLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/fundBudgetPlanVoLeadingOut`,param,{responseType: 'arraybuffer'}), // 资金预算管理导出
    fundBudgetExamineRecordLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/fundBudgetExamineRecordLeadingOut`,param,{responseType: 'arraybuffer'}), // 资金绩效导出
    getAnnualBudgetLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getAnnualBudgetLeadingOut`,param,{responseType: 'arraybuffer'}), // 全年预算导出
    getBudgetPredictionRecordInfoListLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBudgetPredictionRecordInfoListLeadingOut`,param,{responseType: 'arraybuffer'}), // 预测汇总导出
    getPageBudgetInvoicingLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getPageBudgetInvoicingLeadingOut`,param,{responseType: 'arraybuffer'}), // 开票管理导出
    getAutomaticInvoicingPageLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getAutomaticInvoicingPageLeadingOut`,param,{responseType: 'arraybuffer'}), // 自动开票管理导出
    getFundBudgetExecuteRecordLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getFundBudgetExecuteRecordLeadingOut`,param,{responseType: 'arraybuffer'}), // 资金预算执行台账导出
    getBudgetSubjectListLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBudgetSubjectListLeadingOut`,param,{responseType: 'arraybuffer'}), // 资金预算科目导出
    bankRepaymentRecordLeadingOut: (creditId) => request.get(`${apiUrl}/financing/bankRepaymentRecordLeadingOut?creditId=${creditId}`,{responseType: 'arraybuffer'}), // 还款明细导出
    bankCreditAmountVoLeadingOut: (param) => request.post(`${apiUrl}/financing/bankCreditAmountVoLeadingOut`,param,{responseType: 'arraybuffer'}), // 融资台账导出
    getBankLoanInterestMeetLeadingOut: (param) => request.post(`${apiUrl}/bankLoanInterest/getBankLoanInterestMeetLeadingOut`,param,{responseType: 'arraybuffer'}), // 计提应付台账导出
    getInterestPaymentLedgerLeadingOut: (param) => request.post(`${apiUrl}/bankLoanInterest/getBankLoanInterestMeetLeadingOut`,param,{responseType: 'arraybuffer'}), // 利息支付台账导出
    getPageListLeadingOut: (param) => request.post(`${apiUrl}/bankLoanInterest/getPageListLeadingOut`,param,{responseType: 'arraybuffer'}), // 利息管理导出
    leadingOut: (param) => request.post(`${apiUrl}/bankGuarantee/leadingOut`,param,{responseType: 'arraybuffer'}), // 担保台账导出
    detailedLeadingOut: (param) => request.post(`${apiUrl}/bankGuarantee/detailedLeadingOut`,param,{responseType: 'arraybuffer'}), // 担保台账明细详情导出
    getBankCompanyLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBankCompanyLeadingOut`,param,{responseType: 'arraybuffer'}), // 银行信息表导出
    getBankBalanceLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBankBalanceLeadingOut`,param,{responseType: 'arraybuffer'}), // 银行余额表导出
    getInternalTransactionRecordLeadingOut: (param) => request.post(`${apiUrl}/companyLoanAmount/getInternalTransactionRecordLeadingOut`,param,{responseType: 'arraybuffer'}), // 内部往来记录导出
    getCompanyRepaymentLeadingOut: (param) => request.post(`${apiUrl}/companyLoanAmount/getCompanyRepaymentLeadingOut`,param,{responseType: 'arraybuffer'}), // 还款明细导出
    getBankLoanInterestTotalLeadingOut: (param) => request.post(`${apiUrl}/companyLoanAmount/getBankLoanInterestTotalLeadingOut`,param,{responseType: 'arraybuffer'}), // 计息汇总导出
    getInterestPageListLeadingOut: (param) => request.post(`${apiUrl}/companyLoanAmount/getInterestPageListLeadingOut`,param,{responseType: 'arraybuffer'}), // 计息明细表导出
    bfFinanceAgedCanteenNew: (param) => request.post(`${apiUrl}/system/bfFinanceAgedCanteenNew/exportNew`,param,{responseType: 'arraybuffer'}), // 养老系统表导出
    bfFinanceHospitalLedger: (param) => request.post(`${apiUrl}/system/bfFinanceHospitalLedger/export`,param,{responseType: 'arraybuffer'}), // 医疗实验室台账导出
    getBudgetOwnershipInterestLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBudgetOwnershipInterestLeadingOut`,param,{responseType: 'arraybuffer'}), // 所有这权益导出
    fundBudgetPlanSetLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/fundBudgetPlanSetLeadingOut`,param,{responseType: 'arraybuffer'}), // 资金预算计划导出
    getDepartmentBudgetPlanLeadingOutInfo: (param) => request.post(`${apiUrl}/leadingOut/getDepartmentBudgetPlanLeadingOutInfo`,param,{responseType: 'arraybuffer'}), // 流入流出部门资金预算导出
}

/**
 * 其他相关接口
 *
 */
export const otherApi = {
    getListByProjectId: (projectId) => request.get(`bf-bidding/task/contract/getListByProjectId?projectId=${projectId}`), // 通过项目id获取招标合同
    getContractList: (projectId) => request.get(`bf-finance/fund/budget/getContractList?projectId=${projectId}`), // 获取合同列表
    getWuBudgetSubject: (projectId) => request.get(`bf-finance/subject/getWuBudgetSubject`), // 五级科目
}

/* 业务单元维护接口 */
export const businessUnitApi = {
  getPageList: (param) => request.post(`${apiUrl}/fundBudget/businessUnit/getPageList`, param).then(res => res?.data),// 查询列表
  addUnit: (param) => request.post(`${apiUrl}/fundBudget/businessUnit/addOne`, param),// 新增
}

export const fileExportApi = {
  uploadFile: (param) => request.post(`${apiUrl}/fund/budget/import`, param),
  downloadTemplate: () => request.get(`${apiUrl}/fund/budget/template`, { responseType: 'arraybuffer' }),
  downloadError: () => request.get(`${apiUrl}/fund/budget/getFundBudgetPlanImportFailLeadingOut`, { responseType: 'arraybuffer' }),
};

/**
 * CBS相关接口
 * @type {{}}
 */
export const CBS = {
    getBankCompany: (param) => request.post(`${apiUrl}/company/getBankCompany`, param), // 银行信息表
    updateAccountPurpose: (param) => request.get(`${apiUrl}/company/update`, {params:param}), // 编辑用途
    getBankBalance: (param) => request.post(`${apiUrl}/company/getBankBalance`, param), // 银行余额表
    getBankCompanyLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBankCompanyLeadingOut`, param,{responseType: 'arraybuffer'}), // CBS银行信息表导出
    importBank: (param) => request.post(`${apiUrl}/company/CBS/importBank`, param), // cbs银行数据导入
    getBankBalanceLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBankBalanceLeadingOut`, param,{responseType: 'arraybuffer'}), // cbs银行余额导出
    importBalance: (param) => request.post(`${apiUrl}/company/CBS/importBalance`, param), // 余额表导入
    importHisBalance: (param) => request.post(`${apiUrl}/company/CBS/importHisBalance`, param), // 历史余额表导入
    getInnerBalanceList: (param) => request.post(`${apiUrl}/companyLoanAmount/getInnerBalanceList`, param), // 内部户余额记录 实时余额
    getBankInnerHisBalanceLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBankInnerHisBalanceLeadingOut`, param,{responseType: 'arraybuffer'}), // 内部户历史余额导出
    getInnerHisBalanceList: (param) => request.post(`${apiUrl}/companyLoanAmount/getInnerHisBalanceList`, param), // 内部户余额记录 历史余额
    getBankInnerBalanceLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBankInnerBalanceLeadingOut`, param,{responseType: 'arraybuffer'}), // CBS内部户余额导出 实时余额
    getBankHisBalanceLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBankHisBalanceLeadingOut`, param,{responseType: 'arraybuffer'}), // CBS银行历史余额表导出 历史余额
    importInnerBalance: (param) => request.post(`${apiUrl}/companyLoanAmount/CBS/importInnerBalance`, param), // CBS内部户余额表导入 实时余额
    importInnerHisBalance: (param) => request.post(`${apiUrl}/companyLoanAmount/CBS/importInnerHisBalance`, param), // CBS内部户历史余额表导入 历史余额
    getInnerTradeRecordList: (param) => request.post(`${apiUrl}/companyLoanAmount/getInnerTradeRecordList`, param), // CBS内部户交易记录
    importInnerTradeRecord: (param) => request.post(`${apiUrl}/companyLoanAmount/CBS/importInnerTradeRecord`, param), // CBS内部户交易记录表导入
    getBankInnerTradeRecordLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBankInnerTradeRecordLeadingOut`, param,{responseType: 'arraybuffer'}), // CBS内部户交易记录导出
    getInnerCreditList: (param) => request.post(`${apiUrl}/companyLoanAmount/getInnerCreditList`, param), // CBS内部信贷记录
    importInnerCredit: (param) => request.post(`${apiUrl}/companyLoanAmount/CBS/importInnerCredit`, param), // CBS内部信贷表导入
    getBankInnerCreditLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBankInnerCreditLeadingOut`, param,{responseType: 'arraybuffer'}), // CBS内部信贷导出
    getInnerRepayList: (param) => request.post(`${apiUrl}/companyLoanAmount/getInnerRepayList`, param), // 内部 还款记录
    getBankInnerRepayLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBankInnerRepayLeadingOut`, param,{responseType: 'arraybuffer'}), // 内部 还款记录导出
    importInnerRepay: (param) => request.post(`${apiUrl}/companyLoanAmount/CBS/importInnerRepay`, param), // 内部 还款记录导入
    getInnerLoanList: (param) => request.post(`${apiUrl}/companyLoanAmount/getInnerLoanList`, param), // 内部 放款记录
    getBankInnerLoanLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBankInnerLoanLeadingOut`, param,{responseType: 'arraybuffer'}), // 内部 放款记录 导出
    importInnerLoan: (param) => request.post(`${apiUrl}/companyLoanAmount/CBS/importInnerLoan`, param), // 内部 放款记录 导入
    getFinancingRecordList: (param) => request.post(`${apiUrl}/financing/getFinancingRecordList`, param), // 融资台账
    importFinancingRecord: (param) => request.post(`${apiUrl}/financing/CBS/importFinancingRecord`, param), // 融资台账 导入
    getBankFinancingRecordLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBankFinancingRecordLeadingOut`, param,{responseType: 'arraybuffer'}), // 融资台账 导出
    getFinancingLoanList: (param) => request.post(`${apiUrl}/financing/getFinancingLoanList`, param), // 融资台账 提款记录
    importFinancingLoan: (param) => request.post(`${apiUrl}/financing/CBS/importFinancingLoan`, param), // 融资台账 提款记录 导入
    getBankFinancingLoanLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBankFinancingLoanLeadingOut`, param,{responseType: 'arraybuffer'}), // 融资台账 提款记录 导出
    getFinancingRepayList: (param) => request.post(`${apiUrl}/financing/getFinancingRepayList`, param), // 融资台账 还款记录
    importFinancingRepay: (param) => request.post(`${apiUrl}/financing/CBS/importFinancingRepay`, param), // 融资台账 还款记录 导入
    getBankFinancingRepayLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBankFinancingRepayLeadingOut`, param,{responseType: 'arraybuffer'}), // 融资台账 还款记录 导出
    getFinancingContractList: (param) => request.post(`${apiUrl}/financing/getFinancingContractList`, param), // 融资台账 授信合同
    importFinancingContract: (param) => request.post(`${apiUrl}/financing/CBS/importFinancingContract`, param), // 融资台账 授信合同 导入
    getBankFinancingContractLeadingOut: (param) => request.post(`${apiUrl}/leadingOut/getBankFinancingContractLeadingOut`, param,{responseType: 'arraybuffer'}), // 融资台账 授信合同 导出
    getBankGuaranteeList: (param) => request.post(`${apiUrl}/bankGuarantee/getBankGuaranteeList`,param), // 担保台账
    importGuarantee: (param) => request.post(`${apiUrl}/bankGuarantee/CBS/importGuarantee`,param), // 担保台账
    leadingOut: (param) => request.post(`${apiUrl}/bankGuarantee/leadingOut`,param,{responseType: 'arraybuffer'}), // 担保台账 导出
    updateBankGuarantee: (param) => request.post(`${apiUrl}/bankGuarantee/update`,param), // 担保台账  修改
    downloadMB: (param) => request.get(`${apiUrl}/excel/download/mb`,{params:param,responseType: 'arraybuffer'}), // 模版下载
}

/**
* 开票列表
*/
export const invoiceListApi = {
  getPageList: (param) => request.post(`${apiUrl}/receipt/page/list`, param),
  getInfo: (param) => request.get(`${apiUrl}/receipt/info`, { params: param }),// 详情
  exportFIle: (param) => request.post(`${apiUrl}/receipt/export`, param, { responseType: "arraybuffer" }),// 导出
  push: (param) => request.post(`${apiUrl}/receipt/push`, param), // 推送发票
  red: (param) => request.post(`${apiUrl}/receipt/red`, param), // 红冲发票
};

/**
* 开票基础资料
*/
export const invoiceInfoApi = {
  getPageList: (param) => request.post(`${apiUrl}/receipt/type/page/list`, param),
  addCate: (param) => request.post(`${apiUrl}/receipt/type/save`, param),// 新增
  updateCate: (param) => request.post(`${apiUrl}/receipt/type/update`, param),// 修改
  deleteCate: (param) => request.post(`${apiUrl}/receipt/type/deleteBatch`, param),// 删除
  getInfo: (param) => request.get(`${apiUrl}/receipt/type/info`, { params: param }),// 详情
};

export default {
    fundManagementApi,
    budgetManagement,
    invoicingManagementApi,
    retirementApi,
    exportApi,
    companyApi,
    financingApi,
    nurseryApi,
    guaranteeApi,
    medicalTreatmentApi,
    physicalCultureApi,
    culturalCreativityApi,
    businessUnitApi,
    CBS
}
